package com.apes.fico.engine.service;


import com.apes.fico.engine.model.VoucherTemplateEntry;
import com.apes.fico.engine.repository.VoucherTemplateEntryRepository;
import com.apes.framework.api.DomainService;
import com.apes.framework.plugin.esb.api.SimpleRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("voucherTemplateEntryService")
public class VoucherTemplateEntryService extends DomainService {

    @Autowired
    VoucherTemplateEntryRepository voucherTemplateEntryRepository;

    /*
    * 保存/更新
    * */
    public VoucherTemplateEntry create(SimpleRequest request) {
        VoucherTemplateEntry voucherTemplateEntry = request.getO(VoucherTemplateEntry.class);
        return voucherTemplateEntryRepository.saveAndFlush(voucherTemplateEntry);
    }
}
